home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / TCL1 / CSPINNER / CSPINNER._DO next >
Text File  |  1990-12-20  |  3KB  |  81 lines

  1. CSpinner Docs
  2.  
  3.     CSpinner is a class which implements a spinning cursor, usually
  4.     used to indicate that a program is busy (and hasn't crashed).
  5.     
  6.     ⌐ 1990 SPLAsh Resources. All rights reserved.
  7.     
  8.         Written by: Gregory H. Dow
  9.         
  10.     Programmers may freely use the accompanying source code and may include
  11.     object code generated from the source code in their own programs, commercial
  12.     or otherwise, without any attribution. However, the source code may not be
  13.     sold or distributed on bulletin board services without written permission
  14.     from SPLAsh Resources.
  15.     
  16.         SPLAsh Resources
  17.         1678 Shattuck Ave #302
  18.         Berkeley, CA  94709
  19.         (415) 527-0122
  20.     
  21. Methods:
  22.  
  23.     ISpinner - Initialization
  24.     
  25.         Parameters
  26.         
  27.             short    acurID        ID of an 'acur' resource. An 'acur' is a list
  28.                                 of 'CURS' (cursor) resource ID's. The Spinner
  29.                                 creates the illusion of spinning by using each
  30.                                 cursor in the list as a animation "frame", wrapping
  31.                                 around to the beginning when the end is reached.
  32.                                 
  33.             short    aThreshold    Length of time, in ticks, to delay before starting
  34.                                 the first spin. This suppresses spinning for
  35.                                 short operations. For example, The Finder uses a delay
  36.                                 of about 2 seconds (120 ticks) before spinning the
  37.                                 cursor when copying files.
  38.                                 
  39.             short    anInterval    Length of time, in ticks, between cursor changes.
  40.                                 This controls the speed of the spinning.
  41.                                 
  42.     Dispose - Destruction
  43.     
  44.     Reset - Reset internal counters to initial values. Generally used after finishing
  45.                 an operation to cause subsequent operations to observe the threshold
  46.                 time before starting to spin.
  47.     
  48.     SetTimes - Specify new threshold and interval. The new threshold takes effect if
  49.                 Reset() is called before the next spin. The new interval takes effect
  50.                 after the next spin.
  51.     
  52.         Parameters
  53.         
  54.             short    newThreshold    New threshold time, in ticks
  55.             
  56.             short    newInterval        New interval time, in ticks
  57.             
  58.     Spin - Spins by changing the cursor to next one in the 'acur' list if sufficient
  59.             time has passed since the last spin. Must be called repeatedly during
  60.             an operation.
  61.             
  62. Limitations:
  63.  
  64.     CSpinner does not perform error checking. The 'acur' and associated 'CURS'
  65.     resources must exist, otherwise the program will behave erratically.
  66.             
  67.  
  68. Example Usage:
  69.  
  70.     theSpinner = new(CSpinner);
  71.     theSpinner->ISpinner(acurID, thresholdTime, intervalTime);
  72.     
  73.     while (condition) {
  74.         theSpinner->Spin();
  75.         
  76.         {Do something}
  77.     }
  78.     
  79.     theSpinner->Dispose();
  80.     
  81.